<!DOCTYPE HTML>
<html lang="zh">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1"/>
    <meta content="no-cache" http-equiv="cache-control">
    <script type="text/javascript" src="/script/mootools.js"></script>
    <script type="text/javascript" src="/script/mootools-more.js"></script>
    <link rel="stylesheet" type="text/css" href="/script/jspxnet-ui.css"/>
    <script type="text/javascript" src="/script/jspxnet.js"></script>
    <script type="text/javascript" src="/script/jspxnet-ui-roc.js"></script>
    <link rel="stylesheet" type="text/css" href="/script/jspxnet-ui.css"/>
    <link href="/share/mskin/default/devcenter.css" rel="stylesheet" type="text/css"/>
    <link href="/script/highlighter/styles/shCore.css" rel="stylesheet" type="text/css"/>
    <link href="/script/highlighter/styles/shThemeDefault.css" rel="stylesheet" type="text/css"/>
    <script src="/script/vue.js"></script>
    <script type="text/javascript" src="/script/highlighter/scripts/shCore.js"></script>
    <script type="text/javascript" src="/script/highlighter/scripts/shBrushJava.js"></script>
    <style>
        .searchPanel {
            min-width: 300px;
            padding: 0 0 20px;
            margin: auto;
        }
	   .searchPanel input {
		   width:50%;
        }
		
		.post {
		   width:50%;
		   height:200px;
        }

    </style>
    <script type="text/javascript">
  
		function search(){
              var url = $('urlInput').get('value');
			  if (!url)
			  {
				  alert('没有填写url');
				  return;
			  }
			  var posts =  JSON.decode($('post').get('value'));
		 
			 //如果要自己摆放格式 用 /tools/db/createcolumn.jwc
			  new Request.ROC({
                'url': url,'data':posts,
                onSuccess: function (obj,txt) {
                      $('content').set('html',' <pre class="brush:javascript;">'+ txt + '</pre>');
                }
            }).send();
        }
    </script>
    <title></title>
</head>
<body>
<div id="container" class="formContainer borderFieldset">
    <div id="header">
      <h1>HTTP请求</h1>
        <div class="searchPanel"><input id="urlInput" type="text" placeholder="url">
          <button id="searchBtn" onClick="search();">请求</button>
          <br>
          <label for="post"></label>
          <textarea name="post" id="post" class="post" placeholder="参数"></textarea>
        </div>
    </div>
	<div id="container" class="formContainer borderFieldset">
     	 <div id="content" >
		 
         </div>         
	</div>
</div>
</body>
</html>